﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Filter;
using System.Linq.Expressions;

namespace COFE.Data.Filter
{

    /// <summary>
    /// Define an expression so EnumerateFSIs() method can poll entries directly from table.
    /// </summary>
    public class OptionFilterExpression<T> : IFilterExpression<IOptionFilter>
        where T : IOptionFilter
    {
        #region Constructor

        protected  OptionFilterExpression()
        {
            _supportedType = typeof(T);           

        }

        #endregion

        #region Methods

        public virtual IQueryable<Entry> ProcessQuery(
            IQueryable<Entry> input, IOptionFilter filter, IOptionFilter[] options)
        {
            throw new NotImplementedException();
        }


        public virtual IEnumerable<Entry> ProcessQueryOutput(IEnumerable<Entry> input, 
            IOptionFilter filter, IOptionFilter[] options)
        {
            return input;
        }

        #endregion

        #region Data

        private Type _supportedType;
        private Func<IOptionFilter, IOptionFilter[],
            Expression<Func<COFE.Data.Entry, bool>>> _expressionConstructor;


        #endregion

        #region Public Properties

        public Type SupportedType { get { return _supportedType; } }

        #endregion













    }
}
